#include "apue.h"

int g_val = 50;

int main() {
    int val = 100;
    pid_t pid;

    pid = vfork();
    if (pid == 0) {
        g_val ++;
        val ++;
        exit(0);
    } else if (pid < 0) {
        err_sys("vfork error");
    }

    printf("g_val = %d, val = %d\n", g_val, val);

    return 0;
}
